package com.cungmua.app.activity;

import android.os.Bundle;
import android.webkit.WebView;

import com.cungmua.app.R;
import com.cungmua.app.base.BaseDrawerActivitys;

/**
 * Created by kelvin.nguyen on 7/3/14.
 */
public class AboutActivity extends BaseDrawerActivitys {
    private WebView txtContent;
    private int typeContenxt=1;
    @Override
    public int getLayoutResource() {
        return R.layout.activity_about;
    }

    @Override
    public void updateView() {
        super.updateView();
        switch (typeContenxt){
            case 1:
//                txtContent.loadUrl(readTextFromResource(R.raw.about));
                txtContent.loadUrl("file:///android_asset/about.html");
                break;
            case 2:
                txtContent.loadUrl("file:///android_asset/quy_che.html");
                break;
            case 3:
                txtContent.loadUrl("file:///android_asset/hoan_tien.html");
                break;
            case 4:
                txtContent.loadUrl("file:///android_asset/cach_thuc_mua_hang.html");
                break;
            case 5:
                txtContent.loadUrl("file:///android_asset/hinh_thuc_thanh_toan.html");
                break;
            case 6:
                txtContent.loadUrl("file:///android_asset/hinh_thuc_giao_hang.html");

                break;
            default:
                break;
        }
    }

    @Override
    public void loadControls(Bundle savedInstanceState) {
        super.loadControls(savedInstanceState);
        txtContent=(WebView)findViewById(R.id.txtContent);
        txtContent.getSettings().setJavaScriptEnabled(true);
        typeContenxt=getIntent().getExtras().getInt(IK_TYPE_CONTENT);

    }
}
